home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / Menus.a < prev    next >
Encoding:
Text File  |  1998-02-12  |  26.7 KB  |  965 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Menus.a
  3. ;
  4. ;    Contains:    Menu Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    Mac OS 8.1
  7. ;                Release:    Universal Interfaces 3.1
  8. ;
  9. ;    Copyright:    © 1985-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__MENUS__') = 'UNDEFINED' THEN
  19. __MENUS__ SET 1
  20.  
  21.     IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
  22.     include 'AppleEvents.a'
  23.     ENDIF
  24.     IF &TYPE('__CONDITIONALMACROS__') = 'UNDEFINED' THEN
  25.     include 'ConditionalMacros.a'
  26.     ENDIF
  27.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  28.     include 'Events.a'
  29.     ENDIF
  30.     IF &TYPE('__PROCESSES__') = 'UNDEFINED' THEN
  31.     include 'Processes.a'
  32.     ENDIF
  33.     IF &TYPE('__TEXTCOMMON__') = 'UNDEFINED' THEN
  34.     include 'TextCommon.a'
  35.     ENDIF
  36.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  37.     include 'MacTypes.a'
  38.     ENDIF
  39.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  40.     include 'Quickdraw.a'
  41.     ENDIF
  42.  
  43. ; ——————————————————————————————————————————————————————————————————————————————————————
  44. ;     • Menu Types (for Appearance 1.0 and later)                                            
  45. ; ——————————————————————————————————————————————————————————————————————————————————————
  46.  
  47. kMenuStdMenuProc                EQU        63
  48. kMenuStdMenuBarProc                EQU        63
  49.  
  50. kMenuNoModifiers                EQU        0                    ; Mask for no modifiers
  51. kMenuShiftModifier                EQU        $01                    ; Mask for shift key modifier
  52. kMenuOptionModifier                EQU        $02                    ; Mask for option key modifier
  53. kMenuControlModifier            EQU        $04                    ; Mask for control key modifier
  54. kMenuNoCommandModifier            EQU        $08                    ; Mask for no command key modifier
  55.  
  56. kMenuNoIcon                        EQU        0                    ; No icon
  57. kMenuIconType                    EQU        1                    ; Type for ICON
  58. kMenuShrinkIconType                EQU        2                    ; Type for ICON plotted 16 x 16
  59. kMenuSmallIconType                EQU        3                    ; Type for SICN
  60. kMenuColorIconType                EQU        4                    ; Type for cicn
  61. kMenuIconSuiteType                EQU        5                    ; Type for Icon Suite
  62. kMenuIconRefType                EQU        6                    ; Type for Icon Ref
  63. ;  —— end of Appearance 1.0 types
  64.  
  65.  
  66. noMark                            EQU        0                    ;mark symbol for MarkItem
  67.  
  68.                                                             ; menu defProc messages 
  69. kMenuDrawMsg                    EQU        0
  70. kMenuChooseMsg                    EQU        1
  71. kMenuSizeMsg                    EQU        2
  72. kMenuDrawItemMsg                EQU        4
  73. kMenuCalcItemMsg                EQU        5
  74. kMenuThemeSavvyMsg                EQU        7                    ; is your MDEF theme-savvy?  If so, return hex 7473 in the whichItem parameter
  75. mDrawMsg                        EQU        0
  76. mChooseMsg                        EQU        1
  77. mSizeMsg                        EQU        2
  78. mDrawItemMsg                    EQU        4
  79. mCalcItemMsg                    EQU        5
  80.  
  81. kThemeSavvyMenuResponse            EQU        $7473
  82.  
  83. textMenuProc                    EQU        0
  84. hMenuCmd                        EQU        27                    ;itemCmd == 0x001B ==> hierarchical menu
  85. hierMenu                        EQU        -1                    ;a hierarchical menu - for InsertMenu call
  86. mPopUpMsg                        EQU        3                    ;menu defProc messages - place yourself
  87. mctAllItems                        EQU        -98                    ;search for all Items for the given ID
  88. mctLastIDIndic                    EQU        -99                    ;last color table entry has this in ID field
  89.  
  90. MenuInfo                RECORD 0
  91. menuID                     ds.w    1                ; offset: $0 (0)
  92. menuWidth                 ds.w    1                ; offset: $2 (2)
  93. menuHeight                 ds.w    1                ; offset: $4 (4)
  94. menuProc                 ds.l    1                ; offset: $6 (6)
  95. enableFlags                 ds.l    1                ; offset: $A (10)
  96. menuData                 ds        Str255            ; offset: $E (14)
  97. sizeof                     EQU *                    ; size:   $10E (270)
  98.                         ENDR
  99. ; typedef struct MenuInfo *                MenuPtr
  100.  
  101. ; typedef MenuPtr *                        MenuHandle
  102.  
  103. ;  MenuRef is obsolete.  Use MenuHandle. 
  104. ; typedef MenuHandle                     MenuRef
  105.  
  106. MCEntry                    RECORD 0
  107. mctID                     ds.w    1                ; offset: $0 (0)        ; menu ID.  ID = 0 is the menu bar
  108. mctItem                     ds.w    1                ; offset: $2 (2)        ; menu Item. Item = 0 is a title
  109. mctRGB1                     ds        RGBColor        ; offset: $4 (4)        ; usage depends on ID and Item
  110. mctRGB2                     ds        RGBColor        ; offset: $A (10)        ; usage depends on ID and Item
  111. mctRGB3                     ds        RGBColor        ; offset: $10 (16)        ; usage depends on ID and Item
  112. mctRGB4                     ds        RGBColor        ; offset: $16 (22)        ; usage depends on ID and Item
  113. mctReserved                 ds.w    1                ; offset: $1C (28)        ; reserved for internal use
  114. sizeof                     EQU *                    ; size:   $1E (30)
  115.                         ENDR
  116. ; typedef struct MCEntry *                MCEntryPtr
  117.  
  118. MCTable                    RECORD 0
  119. elements                 ds.b    1 * MCEntry.sizeof
  120. sizeof                     EQU *                    ; size:   $1E (30)
  121.                         ENDR
  122.  
  123.  
  124. ; typedef struct MCEntry *                MCTablePtr
  125.  
  126. ; typedef MCTablePtr *                    MCTableHandle
  127.  
  128. MenuCRsrc                RECORD 0
  129. numEntries                 ds.w    1                ; offset: $0 (0)        ; number of entries
  130. mcEntryRecs                 ds        MCTable            ; offset: $2 (2)        ; ARRAY [1..numEntries] of MCEntry
  131. sizeof                     EQU *                    ; size:   $20 (32)
  132.                         ENDR
  133. ; typedef struct MenuCRsrc *            MenuCRsrcPtr
  134.  
  135. ; typedef MenuCRsrcPtr *                MenuCRsrcHandle
  136.  
  137.     IF TARGET_OS_WIN32 THEN
  138. ;  QuickTime 3.0 
  139. MenuAccessKeyRec        RECORD 0
  140. count                     ds.w    1                ; offset: $0 (0)
  141. flags                     ds.l    1                ; offset: $2 (2)
  142. keys                     ds.b    1                ; offset: $6 (6) <-- really an array of length one
  143.                          ORG 8
  144. sizeof                     EQU *                    ; size:   $8 (8)
  145.                         ENDR
  146. ; typedef struct MenuAccessKeyRec *        MenuAccessKeyPtr
  147.  
  148. ; typedef MenuAccessKeyPtr *            MenuAccessKeyHandle
  149.  
  150.     ENDIF    ; TARGET_OS_WIN32
  151.  
  152. ;
  153. ; pascal short GetMBarHeight(void)
  154. ;
  155.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  156.         Macro
  157.         _GetMBarHeight        &dest=(sp)
  158.             move.w            $0BAA,&dest
  159.         EndM
  160.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  161.         IMPORT_CFM_FUNCTION GetMBarHeight
  162.     ENDIF
  163.  
  164. ;
  165. ; pascal void InitMenus(void )
  166. ;
  167.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  168.         _InitMenus:    OPWORD    $A930
  169.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  170.         IMPORT_CFM_FUNCTION InitMenus
  171.     ENDIF
  172.  
  173. ;
  174. ; pascal MenuHandle NewMenu(short menuID, ConstStr255Param menuTitle)
  175. ;
  176.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  177.         _NewMenu:    OPWORD    $A931
  178.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  179.         IMPORT_CFM_FUNCTION NewMenu
  180.     ENDIF
  181.  
  182. ;
  183. ; pascal MenuHandle GetMenu(short resourceID)
  184. ;
  185.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  186.         _GetMenu:    OPWORD    $A9BF
  187.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  188.         IMPORT_CFM_FUNCTION GetMenu
  189.     ENDIF
  190.  
  191. ;
  192. ; pascal void DisposeMenu(MenuHandle theMenu)
  193. ;
  194.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  195.         _DisposeMenu:    OPWORD    $A932
  196.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  197.         IMPORT_CFM_FUNCTION DisposeMenu
  198.     ENDIF
  199.  
  200. ;
  201. ; pascal void AppendMenu(MenuHandle menu, ConstStr255Param data)
  202. ;
  203.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  204.         _AppendMenu:    OPWORD    $A933
  205.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  206.         IMPORT_CFM_FUNCTION AppendMenu
  207.     ENDIF
  208.  
  209. ;
  210. ; pascal void InsertResMenu(MenuHandle theMenu, ResType theType, short afterItem)
  211. ;
  212.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  213.         _InsertResMenu:    OPWORD    $A951
  214.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  215.         IMPORT_CFM_FUNCTION InsertResMenu
  216.     ENDIF
  217.  
  218. ;
  219. ; pascal void InsertMenu(MenuHandle theMenu, short beforeID)
  220. ;
  221.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  222.         _InsertMenu:    OPWORD    $A935
  223.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  224.         IMPORT_CFM_FUNCTION InsertMenu
  225.     ENDIF
  226.  
  227. ;
  228. ; pascal void DeleteMenu(short menuID)
  229. ;
  230.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  231.         _DeleteMenu:    OPWORD    $A936
  232.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  233.         IMPORT_CFM_FUNCTION DeleteMenu
  234.     ENDIF
  235.  
  236. ;
  237. ; pascal void AppendResMenu(MenuHandle theMenu, ResType theType)
  238. ;
  239.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  240.         _AppendResMenu:    OPWORD    $A94D
  241.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  242.         IMPORT_CFM_FUNCTION AppendResMenu
  243.     ENDIF
  244.  
  245. ;
  246. ; pascal void InsertMenuItem(MenuHandle theMenu, ConstStr255Param itemString, short afterItem)
  247. ;
  248.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  249.         _InsertMenuItem:    OPWORD    $A826
  250.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  251.         IMPORT_CFM_FUNCTION InsertMenuItem
  252.     ENDIF
  253.  
  254. ;
  255. ; pascal void DeleteMenuItem(MenuHandle theMenu, short item)
  256. ;
  257.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  258.         _DeleteMenuItem:    OPWORD    $A952
  259.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  260.         IMPORT_CFM_FUNCTION DeleteMenuItem
  261.     ENDIF
  262.  
  263. ;
  264. ; pascal long MenuKey(CharParameter ch)
  265. ;
  266.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  267.         _MenuKey:    OPWORD    $A93E
  268.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  269.         IMPORT_CFM_FUNCTION MenuKey
  270.     ENDIF
  271.  
  272. ;
  273. ; pascal void HiliteMenu(short menuID)
  274. ;
  275.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  276.         _HiliteMenu:    OPWORD    $A938
  277.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  278.         IMPORT_CFM_FUNCTION HiliteMenu
  279.     ENDIF
  280.  
  281. ;
  282. ; pascal void SetMenuItemText(MenuHandle theMenu, short item, ConstStr255Param itemString)
  283. ;
  284.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  285.         _SetMenuItemText:    OPWORD    $A947
  286.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  287.         IMPORT_CFM_FUNCTION SetMenuItemText
  288.     ENDIF
  289.  
  290. ;
  291. ; pascal void GetMenuItemText(MenuHandle theMenu, short item, Str255 itemString)
  292. ;
  293.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  294.         _GetMenuItemText:    OPWORD    $A946
  295.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  296.         IMPORT_CFM_FUNCTION GetMenuItemText
  297.     ENDIF
  298.  
  299. ;
  300. ; pascal void SetItemMark(MenuHandle theMenu, short item, CharParameter markChar)
  301. ;
  302.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  303.         _SetItemMark:    OPWORD    $A944
  304.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  305.         IMPORT_CFM_FUNCTION SetItemMark
  306.     ENDIF
  307.  
  308. ;
  309. ; pascal void GetItemMark(MenuHandle theMenu, short item, CharParameter *markChar)
  310. ;
  311.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  312.         _GetItemMark:    OPWORD    $A943
  313.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  314.         IMPORT_CFM_FUNCTION GetItemMark
  315.     ENDIF
  316.  
  317. ;
  318. ; pascal void SetItemCmd(MenuHandle theMenu, short item, CharParameter cmdChar)
  319. ;
  320.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  321.         _SetItemCmd:    OPWORD    $A84F
  322.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  323.         IMPORT_CFM_FUNCTION SetItemCmd
  324.     ENDIF
  325.  
  326. ;
  327. ; pascal void GetItemCmd(MenuHandle theMenu, short item, CharParameter *cmdChar)
  328. ;
  329.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  330.         _GetItemCmd:    OPWORD    $A84E
  331.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  332.         IMPORT_CFM_FUNCTION GetItemCmd
  333.     ENDIF
  334.  
  335. ;
  336. ; pascal void SetItemIcon(MenuHandle theMenu, short item, short iconIndex)
  337. ;
  338.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  339.         _SetItemIcon:    OPWORD    $A940
  340.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  341.         IMPORT_CFM_FUNCTION SetItemIcon
  342.     ENDIF
  343.  
  344. ;
  345. ; pascal void GetItemIcon(MenuHandle theMenu, short item, short *iconIndex)
  346. ;
  347.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  348.         _GetItemIcon:    OPWORD    $A93F
  349.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  350.         IMPORT_CFM_FUNCTION GetItemIcon
  351.     ENDIF
  352.  
  353. ;
  354. ; pascal void SetItemStyle(MenuHandle theMenu, short item, StyleParameter chStyle)
  355. ;
  356.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  357.         _SetItemStyle:    OPWORD    $A942
  358.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  359.         IMPORT_CFM_FUNCTION SetItemStyle
  360.     ENDIF
  361.  
  362. ;
  363. ; pascal void GetItemStyle(MenuHandle theMenu, short item, Style *chStyle)
  364. ;
  365.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  366.         _GetItemStyle:    OPWORD    $A941
  367.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  368.         IMPORT_CFM_FUNCTION GetItemStyle
  369.     ENDIF
  370.  
  371. ;
  372. ; pascal MenuHandle GetMenuHandle(short menuID)
  373. ;
  374.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  375.         _GetMenuHandle:    OPWORD    $A949
  376.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  377.         IMPORT_CFM_FUNCTION GetMenuHandle
  378.     ENDIF
  379.  
  380. ;
  381. ; pascal void CalcMenuSize(MenuHandle theMenu)
  382. ;
  383.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  384.         _CalcMenuSize:    OPWORD    $A948
  385.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  386.         IMPORT_CFM_FUNCTION CalcMenuSize
  387.     ENDIF
  388.  
  389. ;
  390. ; pascal void DisableItem(MenuHandle theMenu, short item)
  391. ;
  392.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  393.         _DisableItem:    OPWORD    $A93A
  394.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  395.         IMPORT_CFM_FUNCTION DisableItem
  396.     ENDIF
  397.  
  398. ;
  399. ; pascal void EnableItem(MenuHandle theMenu, short item)
  400. ;
  401.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  402.         _EnableItem:    OPWORD    $A939
  403.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  404.         IMPORT_CFM_FUNCTION EnableItem
  405.     ENDIF
  406.  
  407. ;
  408. ; pascal void FlashMenuBar(short menuID)
  409. ;
  410.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  411.         _FlashMenuBar:    OPWORD    $A94C
  412.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  413.         IMPORT_CFM_FUNCTION FlashMenuBar
  414.     ENDIF
  415.  
  416. ;
  417. ; pascal long PopUpMenuSelect(MenuHandle menu, short top, short left, short popUpItem)
  418. ;
  419.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  420.         _PopUpMenuSelect:    OPWORD    $A80B
  421.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  422.         IMPORT_CFM_FUNCTION PopUpMenuSelect
  423.     ENDIF
  424.  
  425. ;
  426. ; pascal long MenuChoice(void )
  427. ;
  428.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  429.         _MenuChoice:    OPWORD    $AA66
  430.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  431.         IMPORT_CFM_FUNCTION MenuChoice
  432.     ENDIF
  433.  
  434. ;
  435. ; pascal void DeleteMCEntries(short menuID, short menuItem)
  436. ;
  437.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  438.         _DeleteMCEntries:    OPWORD    $AA60
  439.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  440.         IMPORT_CFM_FUNCTION DeleteMCEntries
  441.     ENDIF
  442.  
  443. ;
  444. ; pascal MCTableHandle GetMCInfo(void )
  445. ;
  446.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  447.         _GetMCInfo:    OPWORD    $AA61
  448.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  449.         IMPORT_CFM_FUNCTION GetMCInfo
  450.     ENDIF
  451.  
  452. ;
  453. ; pascal void SetMCInfo(MCTableHandle menuCTbl)
  454. ;
  455.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  456.         _SetMCInfo:    OPWORD    $AA62
  457.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  458.         IMPORT_CFM_FUNCTION SetMCInfo
  459.     ENDIF
  460.  
  461. ;
  462. ; pascal void DisposeMCInfo(MCTableHandle menuCTbl)
  463. ;
  464.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  465.         _DisposeMCInfo:    OPWORD    $AA63
  466.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  467.         IMPORT_CFM_FUNCTION DisposeMCInfo
  468.     ENDIF
  469.  
  470. ;
  471. ; pascal MCEntryPtr GetMCEntry(short menuID, short menuItem)
  472. ;
  473.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  474.         _GetMCEntry:    OPWORD    $AA64
  475.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  476.         IMPORT_CFM_FUNCTION GetMCEntry
  477.     ENDIF
  478.  
  479. ;
  480. ; pascal void SetMCEntries(short numEntries, MCTablePtr menuCEntries)
  481. ;
  482.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  483.         _SetMCEntries:    OPWORD    $AA65
  484.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  485.         IMPORT_CFM_FUNCTION SetMCEntries
  486.     ENDIF
  487.  
  488. ;
  489. ; pascal void DrawMenuBar(void )
  490. ;
  491.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  492.         _DrawMenuBar:    OPWORD    $A937
  493.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  494.         IMPORT_CFM_FUNCTION DrawMenuBar
  495.     ENDIF
  496.  
  497. ;
  498. ; pascal void InvalMenuBar(void )
  499. ;
  500.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  501.         _InvalMenuBar:    OPWORD    $A81D
  502.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  503.         IMPORT_CFM_FUNCTION InvalMenuBar
  504.     ENDIF
  505.  
  506. ;
  507. ; pascal void InitProcMenu(short resID)
  508. ;
  509.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  510.         _InitProcMenu:    OPWORD    $A808
  511.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  512.         IMPORT_CFM_FUNCTION InitProcMenu
  513.     ENDIF
  514.  
  515. ;
  516. ; pascal Handle GetMenuBar(void )
  517. ;
  518.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  519.         _GetMenuBar:    OPWORD    $A93B
  520.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  521.         IMPORT_CFM_FUNCTION GetMenuBar
  522.     ENDIF
  523.  
  524. ;
  525. ; pascal void SetMenuBar(Handle menuList)
  526. ;
  527.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  528.         _SetMenuBar:    OPWORD    $A93C
  529.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  530.         IMPORT_CFM_FUNCTION SetMenuBar
  531.     ENDIF
  532.  
  533. ;
  534. ; pascal Boolean SystemEdit(short editCmd)
  535. ;
  536.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  537.         _SystemEdit:    OPWORD    $A9C2
  538.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  539.         IMPORT_CFM_FUNCTION SystemEdit
  540.     ENDIF
  541.  
  542. ;
  543. ; pascal void SystemMenu(long menuResult)
  544. ;
  545.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  546.         _SystemMenu:    OPWORD    $A9B5
  547.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  548.         IMPORT_CFM_FUNCTION SystemMenu
  549.     ENDIF
  550.  
  551. ;
  552. ; pascal Handle GetNewMBar(short menuBarID)
  553. ;
  554.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  555.         _GetNewMBar:    OPWORD    $A9C0
  556.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  557.         IMPORT_CFM_FUNCTION GetNewMBar
  558.     ENDIF
  559.  
  560. ;
  561. ; pascal void ClearMenuBar(void )
  562. ;
  563.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  564.         _ClearMenuBar:    OPWORD    $A934
  565.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  566.         IMPORT_CFM_FUNCTION ClearMenuBar
  567.     ENDIF
  568.  
  569. ;
  570. ; pascal void CheckItem(MenuHandle theMenu, short item, Boolean checked)
  571. ;
  572.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  573.         _CheckItem:    OPWORD    $A945
  574.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  575.         IMPORT_CFM_FUNCTION CheckItem
  576.     ENDIF
  577.  
  578. ;
  579. ; pascal short CountMItems(MenuHandle theMenu)
  580. ;
  581.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  582.         _CountMItems:    OPWORD    $A950
  583.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  584.         IMPORT_CFM_FUNCTION CountMItems
  585.     ENDIF
  586.  
  587. ;
  588. ; pascal void SetMenuFlash(short count)
  589. ;
  590.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  591.         _SetMenuFlash:    OPWORD    $A94A
  592.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  593.         IMPORT_CFM_FUNCTION SetMenuFlash
  594.     ENDIF
  595.  
  596. ;
  597. ; pascal long MenuSelect(Point startPt)
  598. ;
  599.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  600.         _MenuSelect:    OPWORD    $A93D
  601.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  602.         IMPORT_CFM_FUNCTION MenuSelect
  603.     ENDIF
  604.  
  605. ;
  606. ; pascal void InsertFontResMenu(MenuHandle theMenu, short afterItem, short scriptFilter)
  607. ;
  608.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  609.         Macro
  610.         _InsertFontResMenu
  611.             move.w              #$0400,D0
  612.             dc.w                $A825
  613.         EndM
  614.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  615.         IMPORT_CFM_FUNCTION InsertFontResMenu
  616.     ENDIF
  617.  
  618. ;
  619. ; pascal void InsertIntlResMenu(MenuHandle theMenu, ResType theType, short afterItem, short scriptFilter)
  620. ;
  621.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  622.         Macro
  623.         _InsertIntlResMenu
  624.             move.w              #$0601,D0
  625.             dc.w                $A825
  626.         EndM
  627.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  628.         IMPORT_CFM_FUNCTION InsertIntlResMenu
  629.     ENDIF
  630.  
  631.  
  632. ; ——————————————————————————————————————————————————————————————————————————————————————
  633. ;     • Appearance 1.0 and later Menu Manager routines                                    
  634. ; ——————————————————————————————————————————————————————————————————————————————————————
  635. ;
  636. ; pascal UInt32 MenuEvent(const EventRecord *inEvent)
  637. ;
  638.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  639.         Macro
  640.         _MenuEvent
  641.             move.w              #$020C,D0
  642.             dc.w                $A825
  643.         EndM
  644.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  645.         IMPORT_CFM_FUNCTION MenuEvent
  646.     ENDIF
  647.  
  648. ;
  649. ; pascal OSErr SetMenuItemCommandID(MenuHandle inMenu, SInt16 inItem, UInt32 inCommandID)
  650. ;
  651.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  652.         Macro
  653.         _SetMenuItemCommandID
  654.             move.w              #$0502,D0
  655.             dc.w                $A825
  656.         EndM
  657.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  658.         IMPORT_CFM_FUNCTION SetMenuItemCommandID
  659.     ENDIF
  660.  
  661. ;
  662. ; pascal OSErr GetMenuItemCommandID(MenuHandle inMenu, SInt16 inItem, UInt32 *outCommandID)
  663. ;
  664.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  665.         Macro
  666.         _GetMenuItemCommandID
  667.             move.w              #$0503,D0
  668.             dc.w                $A825
  669.         EndM
  670.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  671.         IMPORT_CFM_FUNCTION GetMenuItemCommandID
  672.     ENDIF
  673.  
  674. ;
  675. ; pascal OSErr SetMenuItemModifiers(MenuHandle inMenu, SInt16 inItem, UInt8 inModifiers)
  676. ;
  677.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  678.         Macro
  679.         _SetMenuItemModifiers
  680.             move.w              #$0404,D0
  681.             dc.w                $A825
  682.         EndM
  683.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  684.         IMPORT_CFM_FUNCTION SetMenuItemModifiers
  685.     ENDIF
  686.  
  687. ;
  688. ; pascal OSErr GetMenuItemModifiers(MenuHandle inMenu, SInt16 inItem, UInt8 *outModifiers)
  689. ;
  690.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  691.         Macro
  692.         _GetMenuItemModifiers
  693.             move.w              #$0505,D0
  694.             dc.w                $A825
  695.         EndM
  696.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  697.         IMPORT_CFM_FUNCTION GetMenuItemModifiers
  698.     ENDIF
  699.  
  700. ;
  701. ; pascal OSErr SetMenuItemIconHandle(MenuHandle inMenu, SInt16 inItem, UInt8 inIconType, Handle inIconHandle)
  702. ;
  703.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  704.         Macro
  705.         _SetMenuItemIconHandle
  706.             move.w              #$0606,D0
  707.             dc.w                $A825
  708.         EndM
  709.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  710.         IMPORT_CFM_FUNCTION SetMenuItemIconHandle
  711.     ENDIF
  712.  
  713. ;
  714. ; pascal OSErr GetMenuItemIconHandle(MenuHandle inMenu, SInt16 inItem, UInt8 *outIconType, Handle *outIconHandle)
  715. ;
  716.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  717.         Macro
  718.         _GetMenuItemIconHandle
  719.             move.w              #$0707,D0
  720.             dc.w                $A825
  721.         EndM
  722.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  723.         IMPORT_CFM_FUNCTION GetMenuItemIconHandle
  724.     ENDIF
  725.  
  726. ;
  727. ; pascal OSErr SetMenuItemTextEncoding(MenuHandle inMenu, SInt16 inItem, TextEncoding inScriptID)
  728. ;
  729.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  730.         Macro
  731.         _SetMenuItemTextEncoding
  732.             move.w              #$0408,D0
  733.             dc.w                $A825
  734.         EndM
  735.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  736.         IMPORT_CFM_FUNCTION SetMenuItemTextEncoding
  737.     ENDIF
  738.  
  739. ;
  740. ; pascal OSErr GetMenuItemTextEncoding(MenuHandle inMenu, SInt16 inItem, TextEncoding *outScriptID)
  741. ;
  742.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  743.         Macro
  744.         _GetMenuItemTextEncoding
  745.             move.w              #$0509,D0
  746.             dc.w                $A825
  747.         EndM
  748.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  749.         IMPORT_CFM_FUNCTION GetMenuItemTextEncoding
  750.     ENDIF
  751.  
  752. ;
  753. ; pascal OSErr SetMenuItemHierarchicalID(MenuHandle inMenu, SInt16 inItem, SInt16 inHierID)
  754. ;
  755.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  756.         Macro
  757.         _SetMenuItemHierarchicalID
  758.             move.w              #$040D,D0
  759.             dc.w                $A825
  760.         EndM
  761.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  762.         IMPORT_CFM_FUNCTION SetMenuItemHierarchicalID
  763.     ENDIF
  764.  
  765. ;
  766. ; pascal OSErr GetMenuItemHierarchicalID(MenuHandle inMenu, SInt16 inItem, SInt16 *outHierID)
  767. ;
  768.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  769.         Macro
  770.         _GetMenuItemHierarchicalID
  771.             move.w              #$050E,D0
  772.             dc.w                $A825
  773.         EndM
  774.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  775.         IMPORT_CFM_FUNCTION GetMenuItemHierarchicalID
  776.     ENDIF
  777.  
  778. ;
  779. ; pascal OSErr SetMenuItemFontID(MenuHandle inMenu, SInt16 inItem, SInt16 inFontID)
  780. ;
  781.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  782.         Macro
  783.         _SetMenuItemFontID
  784.             move.w              #$040F,D0
  785.             dc.w                $A825
  786.         EndM
  787.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  788.         IMPORT_CFM_FUNCTION SetMenuItemFontID
  789.     ENDIF
  790.  
  791. ;
  792. ; pascal OSErr GetMenuItemFontID(MenuHandle inMenu, SInt16 inItem, SInt16 *outFontID)
  793. ;
  794.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  795.         Macro
  796.         _GetMenuItemFontID
  797.             move.w              #$0510,D0
  798.             dc.w                $A825
  799.         EndM
  800.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  801.         IMPORT_CFM_FUNCTION GetMenuItemFontID
  802.     ENDIF
  803.  
  804. ;
  805. ; pascal OSErr SetMenuItemRefCon(MenuHandle inMenu, SInt16 inItem, UInt32 inRefCon)
  806. ;
  807.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  808.         Macro
  809.         _SetMenuItemRefCon
  810.             move.w              #$050A,D0
  811.             dc.w                $A825
  812.         EndM
  813.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  814.         IMPORT_CFM_FUNCTION SetMenuItemRefCon
  815.     ENDIF
  816.  
  817. ;
  818. ; pascal OSErr GetMenuItemRefCon(MenuHandle inMenu, SInt16 inItem, UInt32 *outRefCon)
  819. ;
  820.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  821.         Macro
  822.         _GetMenuItemRefCon
  823.             move.w              #$050B,D0
  824.             dc.w                $A825
  825.         EndM
  826.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  827.         IMPORT_CFM_FUNCTION GetMenuItemRefCon
  828.     ENDIF
  829.  
  830. ;
  831. ; pascal OSErr SetMenuItemRefCon2(MenuHandle inMenu, SInt16 inItem, UInt32 inRefCon2)
  832. ;
  833.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  834.         Macro
  835.         _SetMenuItemRefCon2
  836.             move.w              #$0511,D0
  837.             dc.w                $A825
  838.         EndM
  839.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  840.         IMPORT_CFM_FUNCTION SetMenuItemRefCon2
  841.     ENDIF
  842.  
  843. ;
  844. ; pascal OSErr GetMenuItemRefCon2(MenuHandle inMenu, SInt16 inItem, UInt32 *outRefCon2)
  845. ;
  846.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  847.         Macro
  848.         _GetMenuItemRefCon2
  849.             move.w              #$0512,D0
  850.             dc.w                $A825
  851.         EndM
  852.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  853.         IMPORT_CFM_FUNCTION GetMenuItemRefCon2
  854.     ENDIF
  855.  
  856. ;
  857. ; pascal OSErr SetMenuItemKeyGlyph(MenuHandle inMenu, SInt16 inItem, SInt16 inGlyph)
  858. ;
  859.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  860.         Macro
  861.         _SetMenuItemKeyGlyph
  862.             move.w              #$0513,D0
  863.             dc.w                $A825
  864.         EndM
  865.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  866.         IMPORT_CFM_FUNCTION SetMenuItemKeyGlyph
  867.     ENDIF
  868.  
  869. ;
  870. ; pascal OSErr GetMenuItemKeyGlyph(MenuHandle inMenu, SInt16 inItem, SInt16 *outGlyph)
  871. ;
  872.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  873.         Macro
  874.         _GetMenuItemKeyGlyph
  875.             move.w              #$0514,D0
  876.             dc.w                $A825
  877.         EndM
  878.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  879.         IMPORT_CFM_FUNCTION GetMenuItemKeyGlyph
  880.     ENDIF
  881.  
  882. ; ——————————————————————————————————————————————————————————————————————————————————————
  883. ;     • Contextual Menu routines and constants                                            
  884. ;     available with Conxtextual Menu extension 1.0 and later                                
  885. ; ——————————————————————————————————————————————————————————————————————————————————————
  886. ;  Gestalt Selector for classic 68K apps only. 
  887. ;  CFM apps should weak link and check the symbols. 
  888.  
  889. gestaltContextualMenuAttr        EQU        'cmnu'
  890. gestaltContextualMenuUnusedBit    EQU        0
  891. gestaltContextualMenuTrapAvailable EQU    1
  892. ;  Values indicating what kind of help the application supports 
  893.  
  894. kCMHelpItemNoHelp                EQU        0
  895. kCMHelpItemAppleGuide            EQU        1
  896. kCMHelpItemOtherHelp            EQU        2
  897. ;  Values indicating what was chosen from the menu 
  898.  
  899. kCMNothingSelected                EQU        0
  900. kCMMenuItemSelected                EQU        1
  901. kCMShowHelpSelected                EQU        3
  902. ;
  903. ; pascal OSStatus InitContextualMenus(void )
  904. ;
  905.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  906.         Macro
  907.         _InitContextualMenus
  908.             moveq               #1,D0
  909.             dc.w                $AA72
  910.         EndM
  911.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  912.         IMPORT_CFM_FUNCTION InitContextualMenus
  913.     ENDIF
  914.  
  915. ;
  916. ; pascal Boolean IsShowContextualMenuClick(const EventRecord *inEvent)
  917. ;
  918.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  919.         Macro
  920.         _IsShowContextualMenuClick
  921.             moveq               #2,D0
  922.             dc.w                $AA72
  923.         EndM
  924.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  925.         IMPORT_CFM_FUNCTION IsShowContextualMenuClick
  926.     ENDIF
  927.  
  928. ;
  929. ; pascal OSStatus ContextualMenuSelect(MenuHandle inMenu, Point inGlobalLocation, Boolean inReserved, UInt32 inHelpType, ConstStr255Param inHelpItemString, const AEDesc *inSelection, UInt32 *outUserSelectionType, SInt16 *outMenuID, UInt16 *outMenuItem)
  930. ;
  931.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  932.         Macro
  933.         _ContextualMenuSelect
  934.             moveq               #3,D0
  935.             dc.w                $AA72
  936.         EndM
  937.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  938.         IMPORT_CFM_FUNCTION ContextualMenuSelect
  939.     ENDIF
  940.  
  941. ;
  942. ; pascal Boolean ProcessIsContextualMenuClient(ProcessSerialNumber *inPSN)
  943. ;
  944.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  945.         Macro
  946.         _ProcessIsContextualMenuClient
  947.             moveq               #4,D0
  948.             dc.w                $AA72
  949.         EndM
  950.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  951.         IMPORT_CFM_FUNCTION ProcessIsContextualMenuClient
  952.     ENDIF
  953.  
  954.  
  955.  
  956.  
  957.     IF OLDROUTINENAMES THEN
  958.     ENDIF    ; OLDROUTINENAMES
  959.  
  960.  
  961.     IF TARGET_OS_WIN32 THEN
  962.     ENDIF    ; TARGET_OS_WIN32
  963.     ENDIF ; __MENUS__ 
  964.  
  965.